package com.gs.synedocket.dialog;

import android.content.Context;

import com.gs.synedocket.R;

public class CompleteWindow extends BasePopupWindow {
    public CompleteWindow(Context context, IDoneListener iDoneListener) {
        super(context);
        this.iDoneListener = iDoneListener;
    }

    @Override
    public void initView() {
        fd(R.id.tv_ok).setOnClickListener(v -> {
            if (iDoneListener != null) {
                iDoneListener.okFromDialog();
            }
            dismiss();
        });
        fd(R.id.tv_additional).setOnClickListener(v -> {
            if (iDoneListener != null) {
                iDoneListener.additionalFromDialog();
            }
            dismiss();
        });
    }

    @Override
    public void dismiss() {
        super.dismiss();
    }

    @Override
    public int getLayoutId() {
        return R.layout.dialog_complete;
    }

    private IDoneListener iDoneListener;

    public interface IDoneListener {
        void additionalFromDialog();

        void okFromDialog();
    }
}
